package com.gome.han.bigdata.scala.practice

/**
 * @author Hanpeng
 * @date 2021/2/10 15:33
 * @description:
 */
object FeiBoNaQie {
  def main(args: Array[String]): Unit = {
    val num: Int = getFBNQ(5)
    println(num)
  }
  def getFBNQ(n:Int):Int= {
    if(n==1||n==2) {
      return 1
    }else {
      return getFBNQ(n-1)+getFBNQ(n-2)
    }
  }
}
